package com.hao.nettyrpc.exception;

import com.hao.nettyrpc.enums.RpcError;

/**
 * @author haoge
 * @version 1.0
 * @date 2023/4/11 10:53
 */
public class RpcException extends RuntimeException{
    public RpcException(RpcError rpcError, String detail) {
        super(rpcError.getMessage()+":"+detail);
    }

    public RpcException(String message, Throwable cause) {
        super(message,cause);
    }

    public RpcException(RpcError rpcError) {
        super(rpcError.getMessage());
    }
}
